/*
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
*/
#include <stdlib.h>
#include "stu_mis.h"

int main()
{

    while (1)
    {
        int reg = start_menu();
        int y;
        switch (reg)
        {
        case 0:
            return 0;
        case 1:
            while (1)
            {
                stu_show();
                y = yor();
                if (y == 0)
                {
                    exit(0);
                }
                else if (y == 1)
                {
                    continue;
                }
                else if (y == 5)
                {
                    break;
                }
            }
            break;
        case 2:
            while (1)
            {
                stu_add();
                y = yor();
                if (y == 0)
                {
                    exit(0);
                }
                else if (y == 1)
                {
                    continue;
                }
                else if (y == 5)
                {
                    break;
                }
            }
            break;
        case 3:
            while (1)
            {
                stu_find();
                y = yor();
                if (y == 0)
                {
                    exit(0);
                }
                else if (y == 1)
                {
                    continue;
                }
                else if (y == 5)
                {
                    break;
                }
            }
            break;
        case 4:
            while (1)
            {
                stu_change();
                y = yor();
                if (y == 0)
                {
                    exit(0);
                }
                else if (y == 1)
                {
                    continue;
                }
                else if (y == 5)
                {
                    break;
                }
            }
            break;
        case 5:
            while (1)
            {
                stu_del();
                y = yor();
                if (y == 0)
                {
                    exit(0);
                }
                else if (y == 1)
                {
                    continue;
                }
                else if (y == 5)
                {
                    break;
                }
            }
            break;
        }
        

    }
}
